package com.example.function.pool.controller;

import com.example.common.support.AjaxResponse;
import com.example.common.support.CP_GlobalNamingConstant;
import com.example.common.support.CP_OperateLog;
import com.example.function.pool.model.one.AssetsType;
import com.example.function.pool.service.IAssetsTypeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


/**
 * Description: <pool模块controller >. <br>
 * <p>
 * <基本的crud>
 * </p>
 * generate time:2021-7-27 15:55:39
 *
 * @author hanqf
 * @version V1.0
 */

@RestController
@Slf4j
@RequestMapping("/pool")
public class AssetsTypeController {


    @Resource(name = "assetsTypeService")
    protected IAssetsTypeService assetsTypeService;


    /**
     * 查询全部.
     *
     * @return AjaxResponse
     */
    @RequestMapping(value = "/assetsTypes")
    @CP_OperateLog(value = "查询全部资产类型", type = CP_GlobalNamingConstant.OPERATE_LIST)
    public AjaxResponse assetsTypes() {
        final List<AssetsType> assetsTypeList = assetsTypeService.findAll();
        return AjaxResponse.success(assetsTypeList);
    }


}

